From: Luc Teirlinck Date: Sun, 11 Apr 2004 15:40:56 +0000 (+0000) Subject: (Fgenerate_new_buffer_name): Return NAME argument if IGNORE argument X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23290 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ae0fa01206a80f500653ea2fdd4e91ad648bb8d9;p=emacs.git (Fgenerate_new_buffer_name): Return NAME argument if IGNORE argument equals NAME. Doc fix. --- diff --git a/src/buffer.c b/src/buffer.c index 455b03efec2..d62e186fda8 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -766,7 +766,7 @@ DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buff doc: /* Return a string that is the name of no existing buffer based on NAME. If there is no live buffer named NAME, then return NAME. Otherwise modify name by appending `', incrementing NUMBER -until an unused name is found, and then return that name. +\(starting at 2) until an unused name is found, and then return that name. Optional second argument IGNORE specifies a name that is okay to use \(if it is in the sequence to be tried) even if a buffer with that name exists. */) @@ -779,6 +779,9 @@ even if a buffer with that name exists. */) CHECK_STRING (name); + tem = Fstring_equal (name, ignore); + if (!NILP (tem)) + return name; tem = Fget_buffer (name); if (NILP (tem)) return name;